Message: Access to the path '[sitename]\data\umbraco.config' is denied.
Hello, I am seeing this error pop up in the event logs on our webservers 20-30 times a day and I cant figure out why. The file has FULL permissions for the webserver.
This is on Windows server 2008 x64, on a load balanced setup with two servers and content shared over DFS.
We are also having caching issues that could probably be explained by this error. Has any one got any ideas?
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 20/10/2009 4:29:42 p.m.
Event ID: 1334
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: [computer name]
Description:
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/153/ROOT
Process ID: 4844
Exception: System.UnauthorizedAccessException
Message: Access to the path '[sitename]\data\umbraco.config' is denied.
StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.SetAttributes(String path, FileAttributes fileAttributes)
at umbraco.content.ClearDiskCache()
at umbraco.content.SaveContentToDisk(XmlDocument xmlDoc)
at umbraco.content.<>c__DisplayClassc.<SaveContentToDiskAsync>b__b(Object )
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="49152">1334</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2009-10-20T03:29:42.000Z" />
<EventRecordID>28399</EventRecordID>
<Channel>Application</Channel>
<Computer>[servername]</Computer>
<Security />
</System>
<EventData>
<Data>An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/153/ROOT
Process ID: 4844
Exception: System.UnauthorizedAccessException
Message: Access to the path '[sitename]z\data\umbraco.config' is denied.
StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.SetAttributes(String path, FileAttributes fileAttributes)
at umbraco.content.ClearDiskCache()
at umbraco.content.SaveContentToDisk(XmlDocument xmlDoc)
at umbraco.content.<>c__DisplayClassc.<SaveContentToDiskAsync>b__b(Object )
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)</Data>
</EventData>
</Event>
As Slace pointed out your application pool needs to have rights to this file. On a default Windows 2008 Server installation this is the NETWORK SERVICE account, although you may have changed this for your installation.
I blogged about a script I use to set the correct permissions, if you use the NETWORK SERVICE account you can use the script as is, but obviously if you use a different account you would need to modify the script appropriately.
The application pool is running as network service, and network service has full permissions on that file.
Could it be something where perhaps its server1\network service and server2\network service both need permissions not just network service ? if you understand what I mean
is it possible to get this kind of error if say one machine is currently writing the umbraco.config file and the other is trying to access it as well ?
We run it here like that, with the account owning the app pool on each machine being a domain account (the same domain account) and that account has read/ write access to the files/ folders on the share drive.
Hello Thanks for your posts, Ive followed that guide and testing with our website and it went good. that website doesnt have publishing issues or gets the errors on umbraco.config.
I then atempted the same thing with the site were having issues with and got this error. it seems related to courier. I checked that file and the user "websites" has full permissions. and that is what the application pool is runing as. Coincidently its running fine as that user on the app pool with iis is pointing to its locally replicated wwwroot folder on e:. As soon as I change it to \\myweb.domain\inetpub\wwwroot\mywebsite.com I get this error. Yet when doing it with other sites its fine, I hope its not a courier bug
IIS7 x64 Server 2008 umbraco 3.0.6
Any ideas?
Required permissions cannot be acquired.
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
Server Error in '/' Application.
Required permissions cannot be acquired.
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code.
Exception Details:
System.Security.Policy.PolicyException: Required permissions cannot be
acquired.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +7606579
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57
[FileLoadException: Could not load file or assembly 'DeployLX.Licensing.v3, Version=3.1.2000.0, Culture=neutral, PublicKeyToken=798276055709c98a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Could not load file or assembly 'DeployLX.Licensing.v3, Version=3.1.2000.0, Culture=neutral, PublicKeyToken=798276055709c98a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232
System.Web.Compilation.BuildManager.CompileGlobalAsax() +52
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337
[HttpException (0x80004005): Could not load file or assembly 'DeployLX.Licensing.v3, Version=3.1.2000.0, Culture=neutral, PublicKeyToken=798276055709c98a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729
[HttpException (0x80004005): Could not load file or assembly 'DeployLX.Licensing.v3, Version=3.1.2000.0, Culture=neutral, PublicKeyToken=798276055709c98a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8894031
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259
Hmm the site is running in 32bit mode because of that or some other thing
Does that mean I need to change the howto and change the commands from framwork 64 to the 32 bit ?
IE change these ?
* The .Net Code Access Policy must be updated on each server to run with Full Trust for the UsterNC share: ** EXAMPLE: %windir%\Microsoft.NET\Framework64\v2.0.50727\caspol
-m -ag 1. -url "file://\\fileserver.mydomain.local\Inetpub\MySite\*"
FullTrust -name "WebsiteUser" * The IIS user above needs to be granted the appropriate IIS permissions: ** EXAMPLE: %windir%\Microsoft.NET\Framework64\v2.0.50727\Aspnet_regiis.exe -ga ActiveDirectoryDomain\ProcessIdentity * Restart the server
Message: Access to the path '[sitename]\data\umbraco.config' is denied.
Hello, I am seeing this error pop up in the event logs on our webservers 20-30 times a day and I cant figure out why. The file has FULL permissions for the webserver.
This is on Windows server 2008 x64, on a load balanced setup with two servers and content shared over DFS.
We are also having caching issues that could probably be explained by this error. Has any one got any ideas?
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 20/10/2009 4:29:42 p.m.
Event ID: 1334
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: [computer name]
Description:
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/153/ROOT
Process ID: 4844
Exception: System.UnauthorizedAccessException
Message: Access to the path '[sitename]\data\umbraco.config' is denied.
StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.SetAttributes(String path, FileAttributes fileAttributes)
at umbraco.content.ClearDiskCache()
at umbraco.content.SaveContentToDisk(XmlDocument xmlDoc)
at umbraco.content.<>c__DisplayClassc.<SaveContentToDiskAsync>b__b(Object )
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="49152">1334</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2009-10-20T03:29:42.000Z" />
<EventRecordID>28399</EventRecordID>
<Channel>Application</Channel>
<Computer>[servername]</Computer>
<Security />
</System>
<EventData>
<Data>An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/153/ROOT
Process ID: 4844
Exception: System.UnauthorizedAccessException
Message: Access to the path '[sitename]z\data\umbraco.config' is denied.
StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.SetAttributes(String path, FileAttributes fileAttributes)
at umbraco.content.ClearDiskCache()
at umbraco.content.SaveContentToDisk(XmlDocument xmlDoc)
at umbraco.content.<>c__DisplayClassc.<SaveContentToDiskAsync>b__b(Object )
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)</Data>
</EventData>
</Event>
no ideas?
Does the owner of the application pool have full rights? That is the account that needs full rights.
Also, make sure it's not read-only
As Slace pointed out your application pool needs to have rights to this file. On a default Windows 2008 Server installation this is the NETWORK SERVICE account, although you may have changed this for your installation.
I blogged about a script I use to set the correct permissions, if you use the NETWORK SERVICE account you can use the script as is, but obviously if you use a different account you would need to modify the script appropriately.
Blog Post: Script to set Umbraco Permissions
Cheers,
Chris
Hello Thanks for your posts
The application pool is running as network service, and network service has full permissions on that file.
Could it be something where perhaps its server1\network service and server2\network service both need permissions not just network service ? if you understand what I mean
Actually just checked that its the domain network service account that has the access, there is no local machine network service account
is it possible to get this kind of error if say one machine is currently writing the umbraco.config file and the other is trying to access it as well ?
Yes it'd be possible that you'd get errors, but to have it frequently seems unlikely, unless you're doing large amounts of updates.
Have you read the guide to running umbraco in load balanced environments on the wiki? http://our.umbraco.org/wiki/install-and-setup/installing-umbraco-for-load-balanced-environments
We run it here like that, with the account owning the app pool on each machine being a domain account (the same domain account) and that account has read/ write access to the files/ folders on the share drive.
Hello Thanks for your posts, Ive followed that guide and testing with our website and it went good. that website doesnt have publishing issues or gets the errors on umbraco.config.
I then atempted the same thing with the site were having issues with and got this error. it seems related to courier. I checked that file and the user "websites" has full permissions. and that is what the application pool is runing as. Coincidently its running fine as that user on the app pool with iis is pointing to its locally replicated wwwroot folder on e:. As soon as I change it to \\myweb.domain\inetpub\wwwroot\mywebsite.com I get this error. Yet when doing it with other sites its fine, I hope its not a courier bug
IIS7 x64 Server 2008 umbraco 3.0.6
Any ideas?
Required permissions cannot be acquired. body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
Server Error in '/' Application.
Required permissions cannot be acquired.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Hmm the site is running in 32bit mode because of that or some other thing
Does that mean I need to change the howto and change the commands from framwork 64 to the 32 bit ?
IE change these ?
* The .Net Code Access Policy must be updated on each server to run with Full Trust for the UsterNC share:
** EXAMPLE: %windir%\Microsoft.NET\Framework64\v2.0.50727\caspol -m -ag 1. -url "file://\\fileserver.mydomain.local\Inetpub\MySite\*" FullTrust -name "WebsiteUser"
* The IIS user above needs to be granted the appropriate IIS permissions:
** EXAMPLE: %windir%\Microsoft.NET\Framework64\v2.0.50727\Aspnet_regiis.exe -ga ActiveDirectoryDomain\ProcessIdentity
* Restart the server
well you can do an amendment that states the commands to run on a x64 machine. It's obviously not applicable if you're on a x32 machine
Changing the command to apply those settings to the 32bit version of .net fixed it.
Unfortunitly we still get the permission denied error in the event logs.
Changing the command to apply those settings to the 32bit version of .net fixed it.
Unfortunitly we still get the permission denied error in the event logs.
is working on a reply...